package com.example.gymmanagement.service;

import com.example.gymmanagement.Utils.Result;
import com.example.gymmanagement.domain.Field;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDateTime;

/**
* @author 蜗牛菌
* @description 针对表【field】的数据库操作Service
* @createDate 2023-06-06 13:12:01
*/
public interface FieldService extends IService<Field> {
    boolean insert(Field field);

    //按id查询用户
    //Field selectById(Integer id);

    //按id删除用户
    boolean deleteById(Integer id);

    //更新用户
    boolean updateField(Field field);

    //查询所有用户
    Result selectList(int index,int size,Field field);

    Result booking(Long id, Long userNum, LocalDateTime fieldBookingTime, int timeSize, int light);

    Boolean unBooking(long fieldId);

    Result upDateBooking(long fieldId, int time, Long userNum);

    Result stopBooking(long fieldId, Long userNum);
}
